package functii.trigonometrice;

import functii.Functie;
import functii.elementare.Constanta;
import functii.elementare.Putere;
import functii.elementare.Radical;
import operatori.Impartit;
import operatori.Minus;

public class Arcsin extends Functie {

	public String toString() {
		if (fStang == null)
			System.exit(1);
		return concatTermeni(fStang.toString());
	}

	public String concatTermeni(String aux1) {
		String aux;
		int nrP;
		nrP = aux1.charAt(0) == '(' ? 0 : 2;
		aux = "arcsin";
		if (nrP != 0)
			aux += "(";

		aux += aux1;

		if (nrP != 0)
			aux += ")";

		return aux;
	}
	
	public static String ConcatTermeni(String aux1) {
		String aux;
		int nrP;
		nrP = aux1.charAt(0) == '(' ? 0 : 2;
		aux = "arcsin";
		if (nrP != 0)
			aux += "(";

		aux += aux1;

		if (nrP != 0)
			aux += ")";

		return aux;
	}
	
	/*
	public static double Calcul(double aux1) {
		return Math.asin(aux1);
	}

	public double calcul() {
		if (fStang == null)
			System.exit(1);
		return Calcul(fStang.calcul());
	}

	public double calculDerivata() {
		if (fStang == null)
			System.exit(1);
		return Impartit
				.Calcul(fStang.calculDerivata(), Radical.Calcul(Minus.Calcul(
						1.0, Putere.Calcul(fStang.calcul(), new Constanta(2)))));
	}

	public String derivare() {
		if (fStang == null)
			System.exit(1);
		return Impartit.ConcatTermeni(fStang.derivare(), Radical.concatTermeni(
				Minus.ConcatTermeni("1", Putere.concatTermeni(
						fStang.toString(), new Constanta(2))), 1.0 / 2.0));
	}
*/

}
